import { createApp } from 'vue'
import App from './App.vue'

//引入全局scss模板
import '@/styles/index.css'

//element组件库
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

//@ts-ignore 引入svg图标注册文件
import 'virtual:svg-icons-register'
const app = createApp(App);


/*//注册为全局组件 (单个注册)
import SvgIcon from "./components/SvgIcon/svg-icon.vue";
app.component("SvgIcon",SvgIcon);*/

/**
 * 全局注册
 */
import globalComponent from './components/index';
//安装自定义插件--全局组件
app.use(globalComponent);

//日期本土化
app.use(ElementPlus, {
    locale: zhCn,
});

//安装路由
import router from "./router";
app.use(router);

//安装pinia
import pinia from "./store";
app.use(pinia);

// 引入路由守卫
import './permission.ts';

app.mount('#app')
